package cn.kgm.callback.net;

import io.vertx.core.Vertx;
import io.vertx.core.http.HttpClient;
import io.vertx.core.http.HttpMethod;

/**
 * @Version 1.8
 * @Author: Kappi
 * @Date: 2024-3-19 15:07
 * @Description: cn.kgm.callback.net.VertxExample
 */
public class VertxExample {
    public static void main(String[] args) {
        Vertx vertx = Vertx.vertx();
        HttpClient client = vertx.createHttpClient();
        client.request(HttpMethod.GET, 8080, "localhost", "/some-endpoint", response -> {

            System.out.println(response.toString());
            if (response.succeeded()) {
                System.out.println("aaa" );
            } else {
                System.out.println("Failed to get response, status code: " + response.failed());
            }
        });
    }
}
